First knowledge of Java -- (Java study note 1), first knowledge of java Study NotesCore advantages of JAVA: cross-platform-JVM (JAVA Virtual Machine) Implementation of JVM: a standard i
[Java Study Notes] java language core-this keyword of object-oriented, java Study NotesI. this keyword
Embodiment: You can useThis keywordIn the constructor to call other constructor.Principle:Indicates the current object.This is the reference of the object to which the fun
Java study notes 5-class methods, java study notes 5 --
URL: http://www.cnblogs.com/archimedes/p/java-study-note5.html.1. Method Control Process
There are three main process control structures in
JAVA study notes, java Study Notes Lin Xinliang
Previously, I learned about sequential programming. A program can only perform one step at any time. As the first class of concurrent programming, I am very excited.
1. Define a task
Implement the Runnable interface and compile the run () method (the thread will execute t
Java study notes 35 (exception) and java study notes 35
An exception occurs when the code is running.
Java encapsulates multiple exceptions into multiple classes. When a program encounters a problem, it creates an exception class object and throws related information.
Excep
Java study notes 44 (multithreading 1) and java Study Notes
Concept of multithreading: omitted
Multi-threaded objective: to improve efficiency
Main thread:
Package demo; // main thread public class Demo {public static void main (String [] args) {function (); System. out. println (1);} public static void function () {f
JAVA Study Notes (3) and java Study Notes
@ SuppressWarnings ("resource") is used to suppress resource leakage warnings. For example, if I/O class is used, it is not closed.Set features:1) unordered, not random2) unique element3) No subscriptNote: Collection List Set is an interfaceNote: Because the Set does not have a
JAVA Study Notes (20)-collection List, java Study NotesArrayList set
/** ArrayList, which implements the List interface *. When declaring an array, you must specify the element type in the array, which can be the basic data type, it can also be a reference data type * When declaring a set, you can not specify the type
Control Execution Process -- (Java study note 3), java Study NotesThe most basic form of if-else control program flow
Format:If (boolean-expresion ){Statement}OrIf (boolean-expresion ){Statement} Else {Statement}Example:
public static int testIf(int testVal,int target){ int result = 0; if(testVal > target){ result+
Java Study Notes 10, java Study Notes
When a program creates objects, arrays, and other reference objects, the system allocates a memory area for them in the heap memory, and the objects are stored in the memory area,
When the object we create is no longer referenced, the memory will become garbage, and finally wait f
Java Study Notes (2), java Study NotesI. Common java Data Types
Data Type
Bytes occupied
Note:
Int
4
Char
2
Double
8
Float
4
Float a = 2f; (f or F must be added; otherwise, the default value is dou
Java Study Notes 45 (multithreading 2: security issues and solutions), java Study Notes
Thread security issues and solutions:
Security issues occur when multiple threads use one shared data.
A classic case:
Tickets are sold in cinemas, with a total of 100 seats and a maximum of 100 tickets. There are many ways to buy
Java Study Notes 12, java Study Notes
The Object class is the parent class of all classes, arrays, and enumeration classes. It is the root class of the class hierarchy. Each class uses an Object as a superclass. All objects (including
Array.
The Object class implements the following methods:
Let's take a look at the
Java Study Notes-JSP 1 (32), java Study Notes
Servlet as a dynamic web page development technology is too unreliable. In particular, when writing a page, you need to specify the template tag of the page and process a lot of business logic. Therefore, it is complicated.
Think: Why is it so hard for Servlet to write a pa
Java Study Notes-internationalization (41), java Study Notes
Internationalization: internationalization is I18N.
Example:
Websites of undergraduate colleges and universities generally have two webpage styles: Chinese and English. Therefore, this method of displaying different page styles based on different user groups
Java Study Notes 4 (method) and java Study Notes 4
Methods are similar to functions in c ++. The difference is that java's method definition is not limited. The definition in c ++ must be declared before the function call after the main function:
Example of the rectangular area method:
Public class MethodDemo {public s
Java study note 12 (Object-Oriented 5: constructor, this re-exploration), java study note
During development, you often need to specify the property values of object pairs when creating objects,
For example, a Person object should have attributes such as age and name when being created.
So how can we initialize the pro
JAVA Study Notes (46)-internal class details, java Study NotesMember internal class
/** Internal Class * is defined as a Class in another Class. It is called an internal Class. The Inner Class * contains internal classes and is called an external Class Outer Class ** Application Scenario: event processing in the form p
Java Study Notes-sessions (24) and java Study Notes
1. Use cookies to display the user's last access time
Public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// page output response. setCharacterEncoding ("UTF-8"); response. setContentType ("text/html; char
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.